home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / nct04040.geo / 00104.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  4.6 KB  |  206 lines

  1. on startMovie
  2.   Set_CDcounter(4)
  3.   initLesson()
  4.   CheckForTagWd()
  5. end
  6.  
  7. on HideLastStep
  8. end
  9.  
  10. on TheinitCursor
  11.   initCursorCastNum()
  12.   initCursorList(1)
  13.   set CursorCastNum to getCursor(2)
  14.   cursor([CursorCastNum, CursorCastNum + 1])
  15. end
  16.  
  17. on checkScreenStatus
  18.   CheckRollOver()
  19.   CheckSnakeStatus()
  20.   go(the frame)
  21. end
  22.  
  23. on BlinkNext
  24.   if (the timer > getTimer()) and not soundBusy(2) then
  25.     startTimer()
  26.     if the name of cast the castNum of sprite get_NEXTSprite() = "NEXT" then
  27.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT_E"
  28.     else
  29.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT"
  30.     end if
  31.   end if
  32. end
  33.  
  34. on GoNext
  35.   if not get_Disabled() then
  36.     sound stop 2
  37.     if Get_NEXT() > 16 then
  38.       GoNextMovie()
  39.     else
  40.       go("t" & Get_NEXT())
  41.     end if
  42.     Set_NEXT(Get_NEXT() + 1)
  43.   end if
  44. end
  45.  
  46. on stopMovie
  47.   sound stop 1
  48.   unLoad()
  49.   setEmptyCursor()
  50. end
  51.  
  52. on GoNextMovie
  53.   PlaySound("GOSOUND.SO1")
  54.   SaveHilite()
  55.   Add_CDcounter(1)
  56.   set cdNum to Get_CDcounter()
  57.   set movieName to item cdNum of Get_CurrentSnakeScreens()
  58.   go("INIT" & Get_ScreenSubject(), movieName & ".GEO")
  59. end
  60.  
  61. on playTheTSound theTSnd
  62.   if theTSnd < 10 then
  63.     PlaySound("NCT04040.s0" & theTSnd)
  64.   else
  65.     PlaySound("NCT04040.s" & theTSnd)
  66.   end if
  67. end
  68.  
  69. on InitLamp
  70.   set the visible of sprite 33 to 0
  71.   set the visible of sprite 34 to 0
  72.   UpdateCursors(34, 0)
  73.   set the castNum of sprite 32 to the number of cast "lamp_Off"
  74.   UpdateCursors(32, 3)
  75. end
  76.  
  77. on unSetMouseEvents
  78.   global puppetList
  79.   set puppetList to []
  80.   repeat with i = 1 to 48
  81.     add(puppetList, the puppet of sprite i)
  82.     if not (the puppet of sprite i) then
  83.       set the puppet of sprite i to 1
  84.     end if
  85.   end repeat
  86.   play frame "outLamp"
  87. end
  88.  
  89. on setMouseEvents
  90.   global puppetList
  91.   set the mouseDownScript to EMPTY
  92.   set the mouseUpScript to EMPTY
  93.   set the keyDownScript to EMPTY
  94.   set the keyUpScript to EMPTY
  95.   repeat with i = 1 to 48
  96.     if getAt(puppetList, i) = 0 then
  97.       set the puppet of sprite i to 0
  98.     end if
  99.   end repeat
  100.   play done
  101. end
  102.  
  103. on dont
  104.   dontPassEvent()
  105. end
  106.  
  107. on HandleLamp
  108.   sound stop 1
  109.   sound stop 2
  110.   if the name of cast the castNum of sprite 32 = "lamp_On" then
  111.     set the castNum of sprite 32 to the number of cast "lamp_Off"
  112.     set the visible of sprite 33 to 0
  113.     set the visible of sprite 34 to 0
  114.     UpdateCursors(34, 0)
  115.     set the castNum of sprite 34 to the number of cast "EXITLAMP"
  116.     updateStage()
  117.     unSetMouseEvents()
  118.   else
  119.     set the castNum of sprite 32 to the number of cast "lamp_On"
  120.     UpdateCursors(34, 3)
  121.     set the visible of sprite 33 to 1
  122.     set the visible of sprite 34 to 1
  123.     updateStage()
  124.     PlaySound("NCT04040.T01")
  125.     displayTip(34)
  126.   end if
  127.   updateStage()
  128. end
  129.  
  130. on displayTip theExitBtnSp
  131.   global exitTheLoop
  132.   set exitTheLoop to 0
  133.   set the mouseDownScript to "dont"
  134.   set the mouseUpScript to "dont"
  135.   set the keyDownScript to "dont"
  136.   set the keyUpScript to "dont"
  137.   set the exitLock to 0
  138.   repeat while not exitTheLoop
  139.     if the mouseCast = the number of cast "EXITLAMP" then
  140.       set the cursor of sprite 48 to [404, 405]
  141.     else
  142.       set the cursor of sprite 48 to [400, 401]
  143.     end if
  144.     if the mouseDown and (the mouseCast = the number of cast "EXITLAMP") then
  145.       switchExitLampButt(theExitBtnSp, "EXITLAMP_D")
  146.     end if
  147.   end repeat
  148.   set the exitLock to 1
  149.   set the cursor of sprite 48 to 0
  150.   HandleLamp()
  151. end
  152.  
  153. on switchExitLampButt spriteNum, castDown
  154.   global exitTheLoop
  155.   set flag to 0
  156.   set SaveCast to the castNum of sprite spriteNum
  157.   set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  158.   repeat while the mouseDown
  159.     set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  160.   end repeat
  161.   if flag = 1 then
  162.     set exitTheLoop to 1
  163.   end if
  164. end
  165.  
  166. on swapExitLampCast spriteNum, SaveCast, castDown
  167.   if rollOver(spriteNum) then
  168.     set the castNum of sprite spriteNum to the number of cast castDown
  169.     updateStage()
  170.     return 1
  171.   else
  172.     set the castNum of sprite spriteNum to the number of cast SaveCast
  173.     updateStage()
  174.     return 0
  175.   end if
  176. end
  177.  
  178. on blinkHiLight
  179.   if (the timer > getTimer()) and not soundBusy(2) then
  180.     startTimer()
  181.     if the visible of sprite 18 then
  182.       set the visible of sprite 18 to 0
  183.     else
  184.       set the visible of sprite 18 to 1
  185.     end if
  186.   end if
  187. end
  188.  
  189. on blinkSprite
  190.   set xx to 0
  191.   repeat while xx <> 3
  192.     if the timer > getTimer() then
  193.       startTimer()
  194.       if the visible of sprite 18 then
  195.         set the visible of sprite 18 to 0
  196.         updateStage()
  197.         set xxtemp to xx + 1
  198.         set xx to xxtemp
  199.         next repeat
  200.       end if
  201.       set the visible of sprite 18 to 1
  202.       updateStage()
  203.     end if
  204.   end repeat
  205. end
  206.